<div id="mainnav">
<style>
	*[onclick]:hover {
	    background: none!important;
	}
</style>
	<div id="mainnav-menu-wrap">
		<div class="nano">
			<div class="nano-content">
				<ul id="mainnav-menu" class="list-group">
					<!--Menu list item-->
					<li>
						<a href="#" name='1'>
							<i class="fa fa-file-o"></i>
							<span class="menu-title">维修订单管理</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu11"><a href="javascript:go_url('repair_order_datas.html',1,0)">订单数据</a></li>
							<li id="menu12"><a href="javascript:go_url('repair_order_detail_door.html',1,1)">上门订单</a></li>
							<li id="menu13"><a href="javascript:go_url('repair_order_detail_shop.html?a=1',1,2)">到店订单</a></li>
						</ul>
					</li>
					
					<li>
						<a href="#" name='2'>
							<i class="fa fa-file"></i>
							<span class="menu-title">回收订单数据</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu21"><a href="javascript:go_url('recycle_order_datas.html',2,0)">回收订单数据</a></li>
							<li id="menu22"><a href="javascript:go_url('recycle_order_detail_door.html?way=1',2,1)">上门订单</a></li>
							<li id="menu23"><a href="javascript:go_url('recycle_order_detail_door.html?way=2',2,2)">到店订单</a></li>
						</ul>
					</li>
					
					<li>
						<a href="#" name='3'>
							<i class="fa fa-wrench"></i>
							<span class="menu-title">维修业务管理</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu31"><a href="javascript:go_url('set_phone_brand.html',3,0)">机型品牌设置</a></li>
							<li id="menu32"><a href="javascript:go_url('set_phone_maintenance.html?a=1',3,1)">维修费用设置</a></li>
						</ul>
					</li>
					
					<li>
						<a href="#" name='4'>
							<i class="fa fa-recycle"></i>
							<span class="menu-title">回收业务管理</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu41"><a href="javascript:go_url('recycle_brand-version.html',4,0)">机型品牌设置</a></li>
							<li id="menu42"><a href="javascript:go_url('recycle_retrieve-fee.html?a=1',4,1)">回收费用设置</a></li>
						</ul>
					</li>
					
					<li>
						<a id="menu101" href="#" onclick="go_url('city_partner.html',5)" name='5'>
							<i class="fa fa-users"></i>
							<span class="menu-title">城市合伙人管理</span>
						</a>
						<ul class="collapse"></ul>
					</li>
					
					<li>
						<a id="menu51" href="#" onclick="go_url('city_open.html',6)" name='6'>
							<i class="fa fa-university"></i>
							<span class="menu-title">城市开放设置</span>
						</a>
						<ul class="collapse"></ul>
					</li>
					
					<li>
						<a id="" href="#" name='7'>
							<i class="fa fa-cubes"></i>
							<span class="menu-title">机友管理</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu110"><a href="javascript:go_url('jiyou_guanli.html',7,0)">机友列表</a></li>
							<li id="menu111"><a href="javascript:go_url('jiyou_setting.html',7,1)">机友设置</a></li>
							<li id="menu112"><a href="javascript:go_url('jiyou_tixian.html?a=1',7,2)">机友提现审核</a></li>
						</ul>
					</li>
					
					<li>
						<a id="menu61" href="#" onclick="go_url('tixian_shenqing.html','8')" name='8'>
							<i class="fa fa-money"></i>
							<span class="menu-title">提现申请审核</span>
						</a>
						<ul class="collapse"></ul>
					</li>
					
					<li>
						<a href="#" name='9'>
							<i class="fa fa-cubes"></i>
							<span class="menu-title">平台管理</span>
							<i class="arrow"></i>
						</a>
						
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu71"><a href="javascript:go_url('index_banner.html',9,0)">首页banner</a></li>
							<li id="menu72"><a href="javascript:go_url('city_partner_register.html?a=1',9,1)">入驻申请审核</a></li>
						</ul>
					</li>
					
					<li>
						<a href="#" name='10'>
							<i class="fa fa-cubes"></i>
							<span class="menu-title">用户反馈</span>
							<i class="arrow"></i>
						</a>
						<!--Submenu-->
						<ul class="collapse">
							<li id="menu81"><a href="javascript:go_url('feedback.html?a=1',10,0)">投诉建议</a></li>
							<li id="menu82"><a href="javascript:go_url('evaluation.html?a=1',10,1)">用户评价</a></li>
						</ul>
					</li>
					
					<li>
						<a id="menu91" href="#" onclick="go_url('admin_manage.html','11')" name='11'>
							<i class="fa fa-cubes"></i>
							<span class="menu-title">管理员设置</span>
						</a>
						<ul class="collapse"></ul>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>


<script>
	//初始化左侧菜单
	function init_left_menu(i1, i2) {
		i1 = i1 - 1;
		if (i2!=-1) {
			$('#mainnav-menu').find('.collapse').eq(i1).addClass('in');
			$('#mainnav-menu').find('.collapse').eq(i1).find('li').eq(i2).addClass('active-link');
		} else {
			$('#mainnav-menu').children().removeClass('active-link');
			$('#mainnav-menu').children().eq(i1).addClass('active-link');
		}
//		sessionStorage.setItem("i1", '');
//		sessionStorage.setItem("i2", '');
	}
	
	var i1 = sessionStorage.getItem("i1") || 1;
	var i2 = sessionStorage.getItem("i2") || 0;
	
	console.log(i1, i2);
	
	init_left_menu(i1, i2);
	
	//页面跳转
	function go_url(url, i1, i2) {
		console.log(232323);
		sessionStorage.setItem("i1", i1);
		if (i2 != undefined){
			sessionStorage.setItem("i2", i2);
		}else{
			sessionStorage.setItem("i2", -1);
		} 
		location.href = url;
	}
	
	
	$.get("../../index_recycle/partner.php?m=Admin&c=Menu&a=get_administrato_menu", {}, function(res){
		var menus = res.data;
		menus.forEach(function(t, i){
			$("#menu"+t.id).parents("li").css("cssText", "display:block!important;");
			$("#menu"+t.id).css("cssText", "display:block!important;");
		});
	}, "json")
</script>